package com.tanhua.server.controller;

import com.tanhua.server.service.MessageService;
import com.tanhua.vo.HuanXinUserVo;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.http.RequestEntity;
import org.springframework.http.ResponseEntity;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

@RestController
@RequestMapping("/huanxin")

public class HuanXinController {
    @Autowired
    private MessageService messageService;

    /**
     * 返回环信用户信息
     * @return
     */
    @GetMapping("/user")
    public ResponseEntity getUserMessage(){
        HuanXinUserVo vo = messageService.getUserMessage();
        return ResponseEntity.ok(vo);
    }
}
